export interface IPerson {
  _id: string
  firstName: string
  lastName: string
  middleName?: string
  birthDay: Date | null
  comment: string
  config: Object
  isActive: boolean
  email?:string
  phone?:string
  telegram?: string
  sex?: 'male' | 'female'
  photo?: string
}

export interface IEmployee extends IPerson {
  grade?: 'junior' | 'middle' | 'senior'
}

export interface IProjectManager extends IPerson {

}
export interface IProject {
  _id: string
  title: string
  code: string
  manager?: IProjectManager
  from: Date
  to: Date
  comment?: string
  config?: Object
  boardLink?: string
  isActive: boolean
  responsibleEmployee?: IEmployee
}

export interface IProjectToEmployeeLink {
  employee: IEmployee
  project: IProject
  periods: IPeriod[]
  comment?: string
}
export interface IMapProjectToManager {
  manager: IProjectManager
  project: IProject
}

export interface IPeriod {
  id: string
  startTime: Date
  endTime: Date
}


